home *** CD-ROM | disk | FTP | other *** search
- Short: Allocates 16/32 bytes for mem-protection, Ver 1.7
- Author: p-k@htp-tel.de (Peter Keunecke)
- Uploader: p-k@htp-tel.de (Peter Keunecke)
- Version: 1.7
- Type: util/boot
- Requires: AmigaOS 2.04+ (V37)
-
-
- Changes:
- ~~~~~~~
- In 1.3: Bypass for zero and negative byte demands and for
- largest-block orders to keep memory-tests, avail
- and memory-clearing programs running.
-
- In 1.4: Workaround for some interrupt-routines, which break
- the Forbid()-state and call AllocMem() illegally,
- should avoid the crashes with certain CPU-libraries.
-
- In 1.5: For the same reason again, a call for CacheClearU()
- has been added to the patch-installation, to protect
- those tasks, that ignore the Forbid(), from running
- into suicide under special racing-conditions.
-
- In 1.6: FreeMem(0, x) bypass to avoid MuForce ZeroPage-Hits.
- MuForce takes much more care of it than the AmigaOS.
-
- In 1.7: Supports 32-byte alignments for WarpOS allocations.
- Thus MemTrailer has an optional 32 byte switch now.
- The signature consists of a matchword and a pointer.
- The FreeMem() patch is installed before AllocMem().
-
-
- Description:
- ~~~~~~~~~~~
- MemTrailer is a shell-command for the startup-sequence that
- patches the AllocMem() and the FreeMem() exec-functions. It
- adds 16 or 32 bytes as a trailer to prevent trashed memory.
-
- Because some programs make illegal accesses past the end of
- their own memory-allocations or try to use FreeMem() with an
- unaligned argument pointing a few bytes out of bounds, you
- may sometimes get a delayed and unexpected Guru-Meditation.
-
- With the debug-tools MungWall, WipeOut and MuForce together
- with SegTracker you can check your system for this type of
- troublemakers. But these programs are not for permanent use,
- since they are complex and need quite an amount of CPU-time.
-
- In order to use less CPU-time, I made MemTrailer as simple
- as possible with the intention to fix only the most commonly
- situations where illegal memory-accesses could occur. Unlike
- the debug-tools, MemTrailer never displays any messages.
-
- MemTrailer patches AllocMem() to get additional 16/32 bytes
- for each allocation and sets up a signature pointing to the
- top of the memblock. These bytes are sacrificed to protect
- other programs from memory-corruption and the system getting
- Guru-Meditations. Usually FreeMem() cleans up all as normal.
-
- Whenever FreeMem() cannot find a valid signature in the last
- 6 bytes, all the additional bytes are left behind in memory.
- Ok, this is not a real memory-protection, but it helps a bit.
- Since WarpOS has its own memory management, its applications
- are not affected directly by MemTrailer.
-
-
- Installation and usage:
- ~~~~~~~~~~~~~~~~~~~~~~
- Put the command MemTrailer into C: or whereever you like.
- Make some tests, starting MemTrailer from the Shell first,
- before you change your startup-sequence and booting fails!!
- I suggest to install PoolMem for faster memory-allocations.
-
- Add a line to your S:startup-sequence close to the bottom or
- at least after LoadWB and call "MemTrailer" just without Run.
- ~~~~~~~~~~
- If you use WarpOS or anything else, which needs a 32-byte
- alignment for its allocations, use "MemTrailer 32" instead.
- ~~~~~~~~~~~~~
-
- startup-sequence:
-
- Setpatch QUIET
- ...
- PoolMem >NIL: INSTALL KEEPSORTED PUDDLESIZE 16384
- ...
- LoadWB
- ...
- MemTrailer (or MemTrailer 32)
- EndCLI
-
-
-
- It would be nice, if you could give me some feedback whether
- MemTrailer is working on your system and on which hardware
- and software it runs or not, because the only system where
- I'm developing and testing my software is WinUAE and OS 3.1.
-
- Special thanx to Andreas Balke, Marcin Kurek and many others
- for their reports, suggestions and beta-testing.
-
-
- Distribution:
- ~~~~~~~~~~~~
- The program and its sourcecode are FreeWare. I don't give any
- warranties. You're using the program on your own risk and you
- are responsible for any damage it could cause to your system!
-
-
- Peter Keunecke
-